/**
 * @name setState
 * @param {Object} state 原始状态
 * @param {Object} newState 新的状态
 * @desc vuex公共mutation，用于更新state
 */
function setState(state, newState) {
    Object.keys(newState).forEach(key => {
        if (state[key] !== undefined && state[key] !== newState[key]) {
            state[key] = newState[key]
        }
    })
}

export { setState }
